<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <script src="../javascript/script.js"></script>
    <style>
      table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
      }

      th,
      td {
        border: 1px, solid, orange;
        text-align: center;
        padding: 10px;
      }

      th {
        background-color: royalblue;
      }

      button {
        margin-left: 5px;
      }
    </style>
  </head>
  <body>
    <h1 style="text-align: center">表格的增删改查</h1>

    <button onclick="AddRow()">新增数据</button>

    <table id="table">
      <tr>
        <th>姓名</th>
        <th>联系方式</th>
        <th>操作</th>
      </tr>
      <tr>
        <td>张三</td>
        <td>123456</td>
        <td>
          <button onclick="EditRow(this)">编辑</button
          ><button onclick="DeleteRow(this)">删除</button>
        </td>
      </tr>
    </table>
  </body>
</html>
